package org.yenn.pattern.aliyun.j2ee.frontcontroller;

import org.junit.Test;

import static org.junit.Assert.*;

/**
 * @Author: yerenyun
 * @Description:步骤 4
 * 使用 FrontController 来演示前端控制器设计模式。
 */
public class FrontControllerPatternDemo {
    /**
     * 步骤 5
     * 验证输出。
     *
     * Page requested: HOME
     * User is authenticated successfully.
     * Displaying Home Page
     * Page requested: STUDENT
     * User is authenticated successfully.
     * Displaying Student Page
     */
    @Test
    public void dispatchRequest() {
        FrontController frontController = new FrontController();
        frontController.dispatchRequest("HOME");
        frontController.dispatchRequest("STUDENT");
    }
}